package com.corpgovernment.organization.service;

import com.corpgovernment.api.organization.vo.TransferEmployeeOrgInfoVo;
import com.corpgovernment.organization.entity.db.MbFreshPassenger;

import java.util.List;

/**
 * 员工非员工新鲜度service
 *
 * @author yujue.wang
 */
public interface IFreshPassengerService {
    /**
     * 保存
     *
     * @param mbFreshPassenger
     * @return
     */
    boolean save(MbFreshPassenger mbFreshPassenger);

    /**
     * 刷新新鲜度
     *
     * @param mbFreshPassengers
     * @return
     */
    boolean fresh(List<MbFreshPassenger> mbFreshPassengers);

    /**
     * 更新员工
     *
     * @param mbFreshPassenger
     * @return
     */
    boolean updateEmployeeOrg(MbFreshPassenger mbFreshPassenger);

    /**
     * 批量更新员工
     *
     * @param uids
     * @param orgId
     * @return
     */
    boolean batchUpdateEmployeeOrg(List<String> uids, String orgId);

    /**
     * 删除员工
     *
     * @param uid
     * @return
     */
    boolean deleteEmployee(String uid, String orgId);

    /**
     * 删除非员工
     *
     * @param nonEmployeeUid
     * @return
     */
    boolean deleteNonEmployee(Long nonEmployeeUid);

    /**
     * 批量保存
     *
     * @param needSaveFreshPassengerList
     * @return
     */
    boolean batchSave(List<MbFreshPassenger> needSaveFreshPassengerList);

    /**
     * 查询部门下所有人，按照新鲜度排名
     *
     * @param orgId
     * @param pageNum
     * @param uids
     * @param noEmployeeIds
     * @param pageSize
     * @return
     */
    List<MbFreshPassenger> listByOrgId(String orgId, String uid, Integer pageNum, List<String> uids, List<Long> noEmployeeIds, Integer pageSize);

    /**
     * 查询部门列表下所有人，按照新鲜度排名
     *
     * @param orgIds
     * @param uids
     * @param noEmployeeIds
     * @param currentUserOrgId
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<MbFreshPassenger> listByOrgIds(List<String> orgIds, String uid, List<String> uids, List<Long> noEmployeeIds, String currentUserOrgId, Integer pageNum, Integer pageSize);

    /**
     * 查询用户的非员工以及部门列表下所有人，按照新鲜度排名
     */
    List<MbFreshPassenger> listByOrgIdsAndUid(List<String> ids, String uid, List<String> uids, List<Long> noEmployeeIds,
                                              String currentUserOrgId, Integer pageNum, Integer pageSize);

    /**
     * 查询部门下所有人，按照姓名和英文名模糊匹配。按照新鲜度排名
     *
     * @param orgId
     * @param query
     * @param pageNum
     * @param uids
     * @param noEmployeeIds
     * @param pageSize
     * @return
     */
    List<MbFreshPassenger> listByOrgIdAndName(String orgId, String uid, String query, Integer pageNum, List<String> uids, List<Long> noEmployeeIds, Integer pageSize);

    /**
     * 查询部门列表下所有人，按照姓名和英文名模糊匹配。按照新鲜度排名
     *
     * @param orgIds
     * @param query
     * @param uids
     * @param noEmployeeIds
     * @param currentUserOrgId
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<MbFreshPassenger> listByOrgIdsAndName(List<String> orgIds, String uid, String query, List<String> uids, List<Long> noEmployeeIds, String currentUserOrgId, Integer pageNum, Integer pageSize);

    /**
     * 查询用户的非员工以及部门列表下所有人，根据用户名和英文名匹配，按照新鲜度排名
     */
    List<MbFreshPassenger> listByOrgIdsAndUidAndName(List<String> orgIds, String uid, String query,
                                                     List<String> uids, List<Long> noEmployeeIds,
                                                     String currentUserOrgId, Integer pageNum, Integer pageSize);

    boolean updateByEmployeeId(MbFreshPassenger mbFreshPassenger);

    boolean updateByNonEmployeeId(MbFreshPassenger mbFreshPassenger);

    /**
     * 查询用户的所有非员工
     *
     * @param uid
     * @param name
     * @param pageSize
     * @param pageNum
     * @return
     */
    List<MbFreshPassenger> listNonEmployeeByUid(String uid, String orgId, List<Long> noEmployeeIds, List<String> uids, String name, Integer pageSize, Integer pageNum);

    /**
     * 批量禁用
     *
     * @param uids
     * @param orgId
     * @return
     */
    boolean batchInvalid(List<String> uids, String orgId);

    /**
     * 批量恢复
     *
     * @param uids
     * @param orgId
     * @return
     */
    boolean batchValid(List<String> uids, String orgId);

	/**
	 * 删除用户的非员工
	 *
	 * @param uid
	 * @return
	 */
	boolean deleteNonEmployeeByUid(String uid);

	boolean updateAccountValid(String uid, Integer accountValid);

	/**
	 * 更新旅客信息
	 *
	 * @param record
	 * @return
	 */
	int updateByRecord(MbFreshPassenger record);

	Boolean batchUpdateFreshPassenger(TransferEmployeeOrgInfoVo request);

	boolean deleteByUidAndOrgId(List<MbFreshPassenger> mbFreshPassengerList);

	boolean insertList(List<MbFreshPassenger> mbFreshPassengerList);

    boolean updateALLByRecord(MbFreshPassenger record);
}
